<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function sumScores(scores) {
    let total = 0;
    for (let i = 0; i < scores.length; i++) {
        total += scores[i];
    }
      return total;
    }
const studentScores = [85, 90, 78, 92];
const totalScore = sumScores(studentScores);
console.log("学生的总分是: " + totalScore);


    </script>
</body>
</html>